From 660f8ae4a3869129ed0a35b83a8a87ef2c042fdf Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 16 Dec 2023 22:14:06 +0000 Subject: Garbage collect on function exit --- ...rg.shedlang.compiler.testing.snapshots.Snapshotter)].expected | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected') diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index 5c789ad6..84129f10 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineStructTests]/[method:canGenerateCodeForDefineStruct(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -1,12 +1,19 @@ Compilation unit elements: +( + function-decl + "shed__runtime__gc_get_root_stack_index" + params=() + return-type=int +) ( function "shed__function__User__0" visibility=private - locals=((param "closurePointer__0" data-ptr) (param "local__isActive" int) (param "local__name" int) (val "structValuePointer__0" data-ptr) (val "structValue__0" int)) + locals=((param "closurePointer__0" data-ptr) (param "local__isActive" int) (param "local__name" int) (val "gcRootStackIndex__0" int) (val "structValuePointer__0" data-ptr) (val "structValue__0" int)) return-type=int body=( + (call (local "gcRootStackIndex__0") "shed__runtime__gc_get_root_stack_index" ()) (alloc-heap (local "structValuePointer__0") (struct ((struct (data-ptr int int int)) (struct (int (struct (int int))))))) ( memory-store -- cgit v1.2.3